<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%--
  Created by IntelliJ IDEA.
  User: hexi
  Date: 2015/5/17 11:01
  E-MAIL: hex273@tssup.com
--%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="description" content="Flat, Clean, Responsive, admin template built with bootstrap 3">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
    <title>凯信壹立 | 员工资料</title>
    <%@ include file="../include/css.jsp" %>

</head>
<body>
<%@ include file="../include/menu.jsp" %>

<!-- 页面实际内容 -->
<section id="content" class="main-content">
    <div class="content-wrap no-padding">
        <div id="toolbar" class="bg-white clearfix"
             style="border-bottom: 1px solid #e8ecf3; padding-left: 10px; padding-top: 10px;">
            <a href="javascript:;" class="pull-left avatar-padded" style="margin-right: 10px;">
                <i class="fa fa-users fa-4x"></i>
            </a>

            <div class="row">
                <div class="col-md-4">
                    <h4 class="no-mg-t">人员资料</h4>
                    <a href="employee.jsp">新增员工</a> | <a href="employeeList.jsp">员工列表</a>
                </div>
                <div class="col-md-7">
                    <button id="searchForm" class="btn btn-default pull-right mg-r">高级查询</button>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <section class="panel">
                    <section id="searchCondition" class="panel"
                             style="display:none; position: absolute;z-index: 10;width: 100%;">
                        <div class="panel-body" style="padding:1px;">
                            <form class="form-horizontal" role="form">
                                <div class="form-group">
                                    <label for="userNo" class="col-sm-2 control-label">员工工号</label>

                                    <div class="col-sm-4">
                                        <input type="email" class="form-control" id="userNo" placeholder="员工工号">
                                    </div>

                                    <label for="userName" class="col-sm-2 control-label">员工名字</label>

                                    <div class="col-sm-4">
                                        <input type="password" class="form-control" id="userName" placeholder="员工名字">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="compamy" class="col-sm-2 control-label">归属公司</label>

                                    <div class="col-sm-4">
                                        <input type="email" class="form-control" id="compamy" placeholder="归属公司">
                                    </div>

                                    <label for="department" class="col-sm-2 control-label">所属部门</label>

                                    <div class="col-sm-4">
                                        <input type="password" class="form-control" id="department" placeholder="所属部门">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="branch" class="col-sm-2 control-label">下属</label>

                                    <div class="col-sm-4">
                                        <input type="email" class="form-control" id="branch" placeholder="下属">
                                    </div>

                                    <label for="terminalid" class="col-sm-2 control-label">手机号码</label>

                                    <div class="col-sm-4">
                                        <input type="password" class="form-control" id="terminalid" placeholder="手机号码">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-6">
                                        <button type="submit" class="btn btn-primary pull-right">查询</button>
                                    </div>
                                    <div class="col-sm-6">
                                        <button type="submit" class="btn btn btn-default">清空</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </section>
                    <div id="datatableBtn" class="hidden-lg visible-lg-block">
                        <a class="view" href="javascript:void(0)" title="查看">
                            <button type="button" class="btn btn-white no-pd-t no-pd-b"><i
                                    class="fa fa-file-text-o"></i></button>
                        </a>
                        <a class="edit" href="javascript:void(0)" title="编辑">
                            <button type="button" class="btn btn-white  no-pd-t no-pd-b"><i class="fa fa-edit"></i>
                            </button>
                        </a>
                        <a class="remove" href="javascript:void(0)" title="删除">
                            <button type="button" class="btn btn-white no-pd-t no-pd-b"><i class="fa fa-remove"></i>
                            </button>
                        </a>
                    </div>
                    <div id="table_panel" class="panel-body no-padding">
                        <table id="datatable" data-toggle="table" data-url="data.json" data-pagination="true"
                               data-show-columns="true" data-show-refresh="true" data-show-toggle="true">
                            <thead>
                            <tr>
                                <th data-visible="false" data-field="id" data-align="center">id</th>
                                <th data-field="workNum" data-align="center">工号</th>
                                <th data-field="name" data-align="center">名字</th>
                                <th data-field="company" data-align="center">归属公司</th>
                                <th data-field="depart" data-align="center">归属部门</th>
                                <th data-field="superiors" data-align="center">直接上级</th>
                                <th data-field="phone" data-align="center">电话</th>

                                <th data-width="150" data-field="operate" data-formatter="common.operateFormatter"
                                    data-events="operateEvents">操作
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </section>
            </div>
        </div>
    </div>

    <!-- 底部版权信息 -->
    <footer>
        <p>© <a href="javascript:;">凯信壹立2015</a>
        </p>

        <p class="pull-right">All rights reserved
        </p>
    </footer>
    <!-- /.底部版权信息 -->
</section>
<!-- /.页面实际内容 -->
</section><!-- /.页面布局 -->
</div>

<div id="overlay" class="searchoverlay"></div>

<%@ include file="../include/script.jsp" %>
<script>
    //遵循约定. 祝happy
    //--bootstrap-table按钮绑定,期待更好的处理方式.start--//
    function view(e, value, row, index) {
        alert('You click view icon, : ' + JSON.stringify(row));
    }
    function edit(e, value, row, index) {
        alert('You click eidt icon, : ' + JSON.stringify(row));
    }
    function remove(e, value, row, index) {
        alert('You click remove icon, : ' + JSON.stringify(row));
    }
    console.log(common)
    var operateEvents = common.operateEvents(view, edit, remove);
    //--bootstrap-table按钮绑定,期待更好的处理方式. end--//

</script>
</body>
</html>